package orchestration.businessprocess.model.nodes;

import java.util.Set;

import orchestration.businessprocess.model.BPArtifact;
import orchestration.businessprocess.model.BPNodeId;
import orchestration.businessprocess.model.IBPVisitor;


/**
 * An intermediate event models some event that should be thrown or caught
 * @author  <a href="mailto:car.ferrarini@gmail.com">Carlo Ferrarini</a>
 */
public class BPIntEvent extends BPNode {

	/**
	 * @uml.property  name="next"
	 * @uml.associationEnd  
	 */
	private BPNode next;
	
	BPIntEvent(BPNodeId id,BPNode next) {
		super(id, BPNode.NODE_TYPE_INT_EV,null,null);
		this.next=next;
	}
	public BPIntEvent(BPNodeId id,Set<BPArtifact> input,
			Set<BPArtifact> output) {
		super(id, BPNode.NODE_TYPE_INT_EV,input,output);
	}

	@Override
	public void accept(IBPVisitor visitor) {
		visitor.visit(this);
	}

	/**
	 * @return
	 * @uml.property  name="next"
	 */
	public BPNode getNext() {
		return next;
	}
	/**
	 * @param next
	 * @uml.property  name="next"
	 */
	public void setNext(BPNode next) {
		this.next = next;
	}
}
